package com.member.shop.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.member.common.annotation.Excel;
import com.member.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.math.BigDecimal;

/**
 * 用户余额明细对象 sys_biz_user_surplus_details
 *
 * @author wangxin
 * @date 2024-05-14
 */
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_biz_user_surplus_details")
public class SysBizUserSurplusDetails extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 类型 0充值 1消费 2退款
     */
    @Excel(name = "类型 0充值 1消费 2退款")
    private Integer type;

    /**
     * 订单编号
     */
    @Excel(name = "订单编号")
    private String orderId;

    /**
     * 充值金额
     */
    @Excel(name = "充值金额")
    private BigDecimal rechargePrice;

    /**
     * 实际金额
     */
    @Excel(name = "实际金额")
    private BigDecimal price;
    /**
     * 用户
     */
    private Long userId;
    /**
     * 来源 （1 线上：用户 2 线下：代充）
     */
    private Integer source;
    @TableField(exist = false)
    private SysBizUser user;
}
